﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

using ZhimeiSoft.CharmManager.DOL;
using ZhimeiSoft.CharmManager.Server.Factory;
using ZhimeiSoft.CharmManager.Server.BLL.Interface;
using ZhimeiSoft.CharmManager.Server.DAL.Interface;

namespace ZhimeiSoft.CharmManager.Server.BLL
{
    public class EmployeeVacationBLL : IEmployeeVacationBLL
    {
        IEmployeeVacationDAL dal;

        public EmployeeVacationBLL()
        {
            dal = BaseDalFactory.CreateEmployeeVacationDal();
        }

        public void InsertEmployeeVacation(DBEntityEmoloyeeVacation employeeVacation)
        {
            dal.InsertEmployeeVacation(employeeVacation);
        }

        public void DelEmployeeVacation(DBEntityEmoloyeeVacation employeeVacation)
        {
            dal.DelEmployeeVacation(employeeVacation);
        }

        public void UpdateEmployeeVacation(DBEntityEmoloyeeVacation employeeVacation_old, DBEntityEmoloyeeVacation employeeVacation_new)
        {
            dal.UpdateEmployeeVacation(employeeVacation_old, employeeVacation_new);
        }

        public System.Data.DataSet QueryEmployeeVacationDateTime(string startDate, string endDate)
        {
            return dal.QueryEmployeeVacationDateTime(startDate, endDate);
        }

        public System.Data.DataSet QueryEmployeeVacationEmployeeID(int employeeID, string startDate, string endDate)
        {
            return QueryEmployeeVacationEmployeeID(employeeID, startDate, endDate);
        }
        public DataSet QueryEmployeeVacationDay(string vacationDate, string state)
        {
            return dal.QueryEmployeeVacationDay(vacationDate, state);
        }
    }
}
